<?php

// $Id$

require_once('captcha.class.php');

class Captcha_Simple extends Captcha {
	public static function generate_code($length) {
      $possible_characters = '23456789bcdfghjkmnpqrstvwxyz';

      $code = '';

      for($i = 0; $i < $length; $i++) {
         $code .= substr($possible_characters, mt_rand(0, strlen($possible_characters) - 1), 1);
      }

      $_SESSION[Captcha::SESSION_VAR_NAME] = $code;

      return $code;
	}
}


